package com.springboot.knife4j.controller;

import com.springboot.knife4j.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: TongRui乀
 * @Date: 2021/6/20 10:07
 * @description：
 */
@Api(tags = "用户模块")
@RestController
@RequestMapping("user")
public class UserController {


    @ApiOperation(value = "根据Id查询用户")
    @ApiImplicitParam(name = "id", value = "用户ID")
    @GetMapping("{id}")
    public User get(@PathVariable Integer id){
        return User.builder().id(id).name("jack").age(11).email("jack@email.com").build();
    }


}
